<template>
	<view>
		<!--logo-->
		<view class="logo-box">
			<image src="https://6e69-niew6-1302638010.tcb.qcloud.la/%E8%83%8C%E6%99%AF/logo.png" mode="widthFix">
			</image>
		</view>
		<view class="login-form">
			<view class="name">账号</view>
			<view class="row">
				<view class="left">
					<image
						src="https://6e69-niew6-1302638010.tcb.qcloud.la/%E7%99%BB%E5%BD%95%E6%A0%B7%E5%BC%8F/%E7%99%BB%E5%BD%9510/%E8%B4%A6%E5%8F%B7.png">
					</image>
				</view>
				<input type="number" v-model="account" placeholder="请输入账号" maxlength="11"
					placeholder-class="input-placeholder" />
			</view>
			<view class="name">密码</view>
			<view class="row">
				<view class="left">
					<image
						src="https://6e69-niew6-1302638010.tcb.qcloud.la/%E7%99%BB%E5%BD%95%E6%A0%B7%E5%BC%8F/%E7%99%BB%E5%BD%9510/%E5%AF%86%E7%A0%81.png">
					</image>
				</view>
				<input type="text" v-model="password" placeholder="请输入密码" @input="passwordInput" maxlength="20"
					placeholder-class="input-placeholder" />
				<view class="right">
					<image v-if="passwordShow"
						src="https://6e69-niew6-1302638010.tcb.qcloud.la/%E7%99%BB%E5%BD%95%E6%A0%B7%E5%BC%8F/%E7%99%BB%E5%BD%958/%E6%89%93%E5%8B%BE.png"
						mode="widthFix"></image>
				</view>
			</view>
			<view class="login-btn">
				<text>登录</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				account: '',
				password: '',
				passwordShow: false,
			}
		},
		methods: {

			//密码框输入事件
			passwordInput(e) {
				this.passwordShow = e.detail.value == '' ? false : true
			},

			//密码状态 隐藏/显示
			passwordStatus() {
				this.passwordShow = !this.passwordShow
			}
		}
	}
</script>

<style lang="scss">
	page {
		position: relative;
		width: 100vw;
		height: 100vh;
		background-color: #FFFFFF;
	}

	.logo-box {
		width: 100%;
		height: 500rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		box-sizing: 100%;

		image {
			width: 500rpx;
			height: 250rpx;
		}
	}

	.login-form {
		margin: 0 80rpx;

		.name {
			font-size: 28rpx;
			line-height: 50rpx;
		}

		.row {
			margin-bottom: 30rpx;
			display: flex;
			justify-content: flex-start;
			align-items: center;
			height: 100rpx;
			border-bottom: 1rpx solid #ECF0F6;

			.left {
				display: flex;
				align-items: center;
				flex-shrink: 0;
				width: 100rpx;
				height: 100%;
				font-size: 28rpx;
				font-weight: 400;
				color: #7F8B9E;

				image {
					width: 34rpx;
					height: 36rpx;
				}
			}

			input {
				color: #223653;
				font-family: Source Han Sans SC;
				font-weight: 400;
				width: 500rpx;
				font-size: 28rpx;
			}

			.right {
				width: 100rpx;

				image {
					width: 36rpx;
					height: 36rpx;
				}
			}
		}

		.login-btn {
			margin-top: 100rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			font-size: 35rpx;
			font-family: Source Han Sans SC;
			height: 100rpx;
			color: #FFFFFF;
			border-radius: 20rpx;
			background-color: #407bff;
		}

	}

	.input-placeholder {
		line-height: 100rpx;
		font-size: 28rpx;
		font-family: Source Han Sans SC;
		font-weight: 400;
		color: #ACAFB9;
	}
</style>
